3.2.34 \(\int \csc (e+f x) (a+b \sin ^2(e+f x))^{3/2} \, dx\) [134]

3.2.34.1 Optimal result
3.2.34.2 Mathematica [A] (verified)
3.2.34.3 Rubi [A] (verified)
3.2.34.4 Maple [B] (verified)
3.2.34.5 Fricas [B] (verification not implemented)
3.2.34.6 Sympy [F]
3.2.34.7 Maxima [A] (verification not implemented)
3.2.34.8 Giac [F(-2)]
3.2.34.9 Mupad [F(-1)]

3.2.34.1 Optimal result

Integrand size = 23, antiderivative size = 122 \[ \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=-\frac {\sqrt {b} (3 a+b) \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a+b-b \cos ^2(e+f x)}}\right )}{2 f}-\frac {a^{3/2} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a+b-b \cos ^2(e+f x)}}\right )}{f}-\frac {b \cos (e+f x) \sqrt {a+b-b \cos ^2(e+f x)}}{2 f} \]

output
-a^(3/2)*arctanh(cos(f*x+e)*a^(1/2)/(a+b-b*cos(f*x+e)^2)^(1/2))/f-1/2*(3*a 
+b)*arctan(cos(f*x+e)*b^(1/2)/(a+b-b*cos(f*x+e)^2)^(1/2))*b^(1/2)/f-1/2*b* 
cos(f*x+e)*(a+b-b*cos(f*x+e)^2)^(1/2)/f
 
3.2.34.2 Mathematica [A] (verified)

Time = 0.68 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.16 \[ \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=-\frac {4 a^{3/2} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \cos (e+f x)}{\sqrt {2 a+b-b \cos (2 (e+f x))}}\right )+\sqrt {2} b \cos (e+f x) \sqrt {2 a+b-b \cos (2 (e+f x))}-2 \sqrt {-b} (3 a+b) \log \left (\sqrt {2} \sqrt {-b} \cos (e+f x)+\sqrt {2 a+b-b \cos (2 (e+f x))}\right )}{4 f} \]

input
Integrate[Csc[e + f*x]*(a + b*Sin[e + f*x]^2)^(3/2),x]
 
output
-1/4*(4*a^(3/2)*ArcTanh[(Sqrt[2]*Sqrt[a]*Cos[e + f*x])/Sqrt[2*a + b - b*Co 
s[2*(e + f*x)]]] + Sqrt[2]*b*Cos[e + f*x]*Sqrt[2*a + b - b*Cos[2*(e + f*x) 
]] - 2*Sqrt[-b]*(3*a + b)*Log[Sqrt[2]*Sqrt[-b]*Cos[e + f*x] + Sqrt[2*a + b 
 - b*Cos[2*(e + f*x)]]])/f
 
3.2.34.3 Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.98, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {3042, 3665, 318, 25, 398, 224, 216, 291, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (a+b \sin (e+f x)^2\right )^{3/2}}{\sin (e+f x)}dx\)

\(\Big \downarrow \) 3665

\(\displaystyle -\frac {\int \frac {\left (-b \cos ^2(e+f x)+a+b\right )^{3/2}}{1-\cos ^2(e+f x)}d\cos (e+f x)}{f}\)

\(\Big \downarrow \) 318

\(\displaystyle -\frac {\frac {1}{2} b \cos (e+f x) \sqrt {a-b \cos ^2(e+f x)+b}-\frac {1}{2} \int -\frac {(a+b) (2 a+b)-b (3 a+b) \cos ^2(e+f x)}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)}{f}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {\frac {1}{2} \int \frac {(a+b) (2 a+b)-b (3 a+b) \cos ^2(e+f x)}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)+\frac {1}{2} b \cos (e+f x) \sqrt {a-b \cos ^2(e+f x)+b}}{f}\)

\(\Big \downarrow \) 398

\(\displaystyle -\frac {\frac {1}{2} \left (2 a^2 \int \frac {1}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)+b (3 a+b) \int \frac {1}{\sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)\right )+\frac {1}{2} b \cos (e+f x) \sqrt {a-b \cos ^2(e+f x)+b}}{f}\)

\(\Big \downarrow \) 224

\(\displaystyle -\frac {\frac {1}{2} \left (2 a^2 \int \frac {1}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)+b (3 a+b) \int \frac {1}{\frac {b \cos ^2(e+f x)}{-b \cos ^2(e+f x)+a+b}+1}d\frac {\cos (e+f x)}{\sqrt {-b \cos ^2(e+f x)+a+b}}\right )+\frac {1}{2} b \cos (e+f x) \sqrt {a-b \cos ^2(e+f x)+b}}{f}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {\frac {1}{2} \left (2 a^2 \int \frac {1}{\left (1-\cos ^2(e+f x)\right ) \sqrt {-b \cos ^2(e+f x)+a+b}}d\cos (e+f x)+\sqrt {b} (3 a+b) \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )\right )+\frac {1}{2} b \cos (e+f x) \sqrt {a-b \cos ^2(e+f x)+b}}{f}\)

\(\Big \downarrow \) 291

\(\displaystyle -\frac {\frac {1}{2} \left (2 a^2 \int \frac {1}{1-\frac {a \cos ^2(e+f x)}{-b \cos ^2(e+f x)+a+b}}d\frac {\cos (e+f x)}{\sqrt {-b \cos ^2(e+f x)+a+b}}+\sqrt {b} (3 a+b) \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )\right )+\frac {1}{2} b \cos (e+f x) \sqrt {a-b \cos ^2(e+f x)+b}}{f}\)

\(\Big \downarrow \) 219

\(\displaystyle -\frac {\frac {1}{2} \left (2 a^{3/2} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )+\sqrt {b} (3 a+b) \arctan \left (\frac {\sqrt {b} \cos (e+f x)}{\sqrt {a-b \cos ^2(e+f x)+b}}\right )\right )+\frac {1}{2} b \cos (e+f x) \sqrt {a-b \cos ^2(e+f x)+b}}{f}\)

input
Int[Csc[e + f*x]*(a + b*Sin[e + f*x]^2)^(3/2),x]
 
output
-(((Sqrt[b]*(3*a + b)*ArcTan[(Sqrt[b]*Cos[e + f*x])/Sqrt[a + b - b*Cos[e + 
 f*x]^2]] + 2*a^(3/2)*ArcTanh[(Sqrt[a]*Cos[e + f*x])/Sqrt[a + b - b*Cos[e 
+ f*x]^2]])/2 + (b*Cos[e + f*x]*Sqrt[a + b - b*Cos[e + f*x]^2])/2)/f)
 

3.2.34.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 291
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst 
[Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, 
d}, x] && NeQ[b*c - a*d, 0]
 

rule 318
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim 
p[d*x*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1)/(b*(2*(p + q) + 1))), x] + S 
imp[1/(b*(2*(p + q) + 1))   Int[(a + b*x^2)^p*(c + d*x^2)^(q - 2)*Simp[c*(b 
*c*(2*(p + q) + 1) - a*d) + d*(b*c*(2*(p + 2*q - 1) + 1) - a*d*(2*(q - 1) + 
 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b*c - a*d, 0] && G 
tQ[q, 1] && NeQ[2*(p + q) + 1, 0] &&  !IGtQ[p, 1] && IntBinomialQ[a, b, c, 
d, 2, p, q, x]
 

rule 398
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]) 
, x_Symbol] :> Simp[f/b   Int[1/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/ 
b   Int[1/((a + b*x^2)*Sqrt[c + d*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f} 
, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3665
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^ 
(p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f 
Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + 
 f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]
 
3.2.34.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(254\) vs. \(2(104)=208\).

Time = 1.13 (sec) , antiderivative size = 255, normalized size of antiderivative = 2.09

method result size
default \(\frac {\sqrt {\left (\cos ^{2}\left (f x +e \right )\right ) \left (a +b \left (\sin ^{2}\left (f x +e \right )\right )\right )}\, \left (b^{\frac {3}{2}} \arctan \left (\frac {-2 b \left (\cos ^{2}\left (f x +e \right )\right )+a +b}{2 \sqrt {b}\, \sqrt {-b \left (\cos ^{4}\left (f x +e \right )\right )+\left (a +b \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right )-2 a^{\frac {3}{2}} \ln \left (\frac {-\left (a -b \right ) \left (\cos ^{2}\left (f x +e \right )\right )-2 \sqrt {a}\, \sqrt {-b \left (\cos ^{4}\left (f x +e \right )\right )+\left (a +b \right ) \left (\cos ^{2}\left (f x +e \right )\right )}-a -b}{\cos ^{2}\left (f x +e \right )-1}\right )+3 \sqrt {b}\, \arctan \left (\frac {-2 b \left (\cos ^{2}\left (f x +e \right )\right )+a +b}{2 \sqrt {b}\, \sqrt {-b \left (\cos ^{4}\left (f x +e \right )\right )+\left (a +b \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right ) a -2 b \sqrt {-b \left (\cos ^{4}\left (f x +e \right )\right )+\left (a +b \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\right )}{4 \cos \left (f x +e \right ) \sqrt {a +b \left (\sin ^{2}\left (f x +e \right )\right )}\, f}\) \(255\)

input
int(csc(f*x+e)*(a+b*sin(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)
 
output
1/4*(cos(f*x+e)^2*(a+b*sin(f*x+e)^2))^(1/2)*(b^(3/2)*arctan(1/2*(-2*b*cos( 
f*x+e)^2+a+b)/b^(1/2)/(-b*cos(f*x+e)^4+(a+b)*cos(f*x+e)^2)^(1/2))-2*a^(3/2 
)*ln((-(a-b)*cos(f*x+e)^2-2*a^(1/2)*(-b*cos(f*x+e)^4+(a+b)*cos(f*x+e)^2)^( 
1/2)-a-b)/(cos(f*x+e)^2-1))+3*b^(1/2)*arctan(1/2*(-2*b*cos(f*x+e)^2+a+b)/b 
^(1/2)/(-b*cos(f*x+e)^4+(a+b)*cos(f*x+e)^2)^(1/2))*a-2*b*(-b*cos(f*x+e)^4+ 
(a+b)*cos(f*x+e)^2)^(1/2))/cos(f*x+e)/(a+b*sin(f*x+e)^2)^(1/2)/f
 
3.2.34.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (104) = 208\).

Time = 0.58 (sec) , antiderivative size = 1282, normalized size of antiderivative = 10.51 \[ \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\text {Too large to display} \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e)^2)^(3/2),x, algorithm="fricas")
 
output
[-1/16*(8*sqrt(-b*cos(f*x + e)^2 + a + b)*b*cos(f*x + e) - (3*a + b)*sqrt( 
-b)*log(128*b^4*cos(f*x + e)^8 - 256*(a*b^3 + b^4)*cos(f*x + e)^6 + 160*(a 
^2*b^2 + 2*a*b^3 + b^4)*cos(f*x + e)^4 + a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b 
^3 + b^4 - 32*(a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*cos(f*x + e)^2 - 8*(16*b 
^3*cos(f*x + e)^7 - 24*(a*b^2 + b^3)*cos(f*x + e)^5 + 10*(a^2*b + 2*a*b^2 
+ b^3)*cos(f*x + e)^3 - (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(f*x + e))*sqrt 
(-b*cos(f*x + e)^2 + a + b)*sqrt(-b)) - 4*a^(3/2)*log(2*((a^2 - 6*a*b + b^ 
2)*cos(f*x + e)^4 + 2*(3*a^2 + 2*a*b - b^2)*cos(f*x + e)^2 - 4*((a - b)*co 
s(f*x + e)^3 + (a + b)*cos(f*x + e))*sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt( 
a) + a^2 + 2*a*b + b^2)/(cos(f*x + e)^4 - 2*cos(f*x + e)^2 + 1)))/f, 1/16* 
(8*sqrt(-a)*a*arctan(-1/2*((a - b)*cos(f*x + e)^2 + a + b)*sqrt(-b*cos(f*x 
 + e)^2 + a + b)*sqrt(-a)/(a*b*cos(f*x + e)^3 - (a^2 + a*b)*cos(f*x + e))) 
 - 8*sqrt(-b*cos(f*x + e)^2 + a + b)*b*cos(f*x + e) + (3*a + b)*sqrt(-b)*l 
og(128*b^4*cos(f*x + e)^8 - 256*(a*b^3 + b^4)*cos(f*x + e)^6 + 160*(a^2*b^ 
2 + 2*a*b^3 + b^4)*cos(f*x + e)^4 + a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + 
b^4 - 32*(a^3*b + 3*a^2*b^2 + 3*a*b^3 + b^4)*cos(f*x + e)^2 - 8*(16*b^3*co 
s(f*x + e)^7 - 24*(a*b^2 + b^3)*cos(f*x + e)^5 + 10*(a^2*b + 2*a*b^2 + b^3 
)*cos(f*x + e)^3 - (a^3 + 3*a^2*b + 3*a*b^2 + b^3)*cos(f*x + e))*sqrt(-b*c 
os(f*x + e)^2 + a + b)*sqrt(-b)))/f, 1/8*((3*a + b)*sqrt(b)*arctan(1/4*(8* 
b^2*cos(f*x + e)^4 - 8*(a*b + b^2)*cos(f*x + e)^2 + a^2 + 2*a*b + b^2)*...
 
3.2.34.6 Sympy [F]

\[ \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\int \left (a + b \sin ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}} \csc {\left (e + f x \right )}\, dx \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e)**2)**(3/2),x)
 
output
Integral((a + b*sin(e + f*x)**2)**(3/2)*csc(e + f*x), x)
 
3.2.34.7 Maxima [A] (verification not implemented)

Time = 0.50 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.47 \[ \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=-\frac {3 \, a \sqrt {b} \arcsin \left (\frac {b \cos \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right ) + b^{\frac {3}{2}} \arcsin \left (\frac {b \cos \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right ) + \sqrt {-b \cos \left (f x + e\right )^{2} + a + b} b \cos \left (f x + e\right ) + a^{\frac {3}{2}} \log \left (b - \frac {\sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {a}}{\cos \left (f x + e\right ) - 1} - \frac {a}{\cos \left (f x + e\right ) - 1}\right ) - a^{\frac {3}{2}} \log \left (-b + \frac {\sqrt {-b \cos \left (f x + e\right )^{2} + a + b} \sqrt {a}}{\cos \left (f x + e\right ) + 1} + \frac {a}{\cos \left (f x + e\right ) + 1}\right )}{2 \, f} \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e)^2)^(3/2),x, algorithm="maxima")
 
output
-1/2*(3*a*sqrt(b)*arcsin(b*cos(f*x + e)/sqrt(a*b + b^2)) + b^(3/2)*arcsin( 
b*cos(f*x + e)/sqrt(a*b + b^2)) + sqrt(-b*cos(f*x + e)^2 + a + b)*b*cos(f* 
x + e) + a^(3/2)*log(b - sqrt(-b*cos(f*x + e)^2 + a + b)*sqrt(a)/(cos(f*x 
+ e) - 1) - a/(cos(f*x + e) - 1)) - a^(3/2)*log(-b + sqrt(-b*cos(f*x + e)^ 
2 + a + b)*sqrt(a)/(cos(f*x + e) + 1) + a/(cos(f*x + e) + 1)))/f
 
3.2.34.8 Giac [F(-2)]

Exception generated. \[ \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\text {Exception raised: TypeError} \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e)^2)^(3/2),x, algorithm="giac")
 
output
Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Error: Bad Argument Type
 
3.2.34.9 Mupad [F(-1)]

Timed out. \[ \int \csc (e+f x) \left (a+b \sin ^2(e+f x)\right )^{3/2} \, dx=\int \frac {{\left (b\,{\sin \left (e+f\,x\right )}^2+a\right )}^{3/2}}{\sin \left (e+f\,x\right )} \,d x \]

input
int((a + b*sin(e + f*x)^2)^(3/2)/sin(e + f*x),x)
 
output
int((a + b*sin(e + f*x)^2)^(3/2)/sin(e + f*x), x)